package com.zbw;

import java.util.concurrent.*;

public class ThreadCallable implements Callable<String> {
    public static void main(String args[]) throws ExecutionException, InterruptedException {
        ThreadCallable tc=new ThreadCallable();
        FutureTask futureTask = new FutureTask(tc);
        new Thread(futureTask).start();
        String result=(String)futureTask.get();
        System.out.println(result);
    };
    @Override
    public String call(){
        return "123";
    };
}
